// AWTMouseEvent.h: interface for the AWTMouseEvent class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_AWTMOUSEEVENT_H__3454E294_69BC_11D2_A411_006097A44215__INCLUDED_)
#define AFX_AWTMOUSEEVENT_H__3454E294_69BC_11D2_A411_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "AWTEvent.h"
#include "AWTInputEvent.h"

#define MOUSE_FIRST 500

class AFX_EXT_CLASS AWTMouseEvent : public AWTInputEvent  
{
DECLARE_DYNAMIC(AWTMouseEvent)
public:
	AWTMouseEvent(AWTObject* source, int id, long when, int modifiers,
		          int x, int y, int clickCount, BOOL popupTrigger);
	virtual ~AWTMouseEvent();

	enum {
		MOUSE_CLICKED = MOUSE_FIRST,
		MOUSE_PRESSED,
		MOUSE_RELEASED,
		MOUSE_MOVED_EVENT,  //clashes with Windows constant
		MOUSE_ENTERED,
		MOUSE_EXITED,
		MOUSE_DRAGGED};

	int getX()
		{return m_x;}
	int getY()
		{return m_y;}
	CPoint getPoint()
		{return CPoint(m_x, m_y);}
	void translatePoint(int x, int y)
		{m_x += x; m_y += y;}
	int getClickCount()
		{return m_clickCount;}
	BOOL isPopupTrigger()
		{return m_popupTrigger;}

protected:
	int m_x;
	int m_y;
	int m_clickCount;
	BOOL m_popupTrigger;
};

#endif // !defined(AFX_AWTMOUSEEVENT_H__3454E294_69BC_11D2_A411_006097A44215__INCLUDED_)
